<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org"> 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="static/easyui/themes/bootstrap/easyui.css">
<link rel="stylesheet" type="text/css" href="static/easyui/themes/icon.css">
<link rel="stylesheet" href="static/css/style.css" />
<script src="static/jquery/jquery-1.12.4.js"></script>
<script src="static/easyui/jquery.easyui.min.js"></script>
<script src="static/easyui/locale/easyui-lang-zh_CN.js"></script>
<title>预算明细</title>
</head>

<body>
<div class="content-container"  data-options="region:'center'" title="预算明细列表">
<div class="panel-header"><div class="panel-title">预算明细列表</div></div>">
		<table id="pro_table" class="easyui-datagrid" style="height: 100%">
		</table>
	</div>
	
</body>
<script th:inline="javascript">
	var currentPro;
	var budgetMain =[[${budgetMain}]];
	
	$(document).ready(function() {
		$('#pro_table').datagrid({
			rownumbers : true,
			singleSelect : true,
			pagination : true,
			fitColumns : false,
			border : false,
			striped : true,
			toolbar : '#pro_tb',
			url : "subitembudget.do?budgetmainid="+budgetMain.id,
			method : 'get',
			onSelect : function(index, row) {
				currentPro = row;
			},
			columns : [ [ {
				field : 'name',
				title : '预算类别',
				width : ''
			}, {
				field : 'money',
				title : '金额',
				width : ''
			},{
				field : 'content',
				title : '描述',
				width : ''
			}, {
				field : 'status',
				title : '状态',
				width : '100px',
				formatter : function(value, row, index) {
					if(value==4){
						return value='已审';
					}else if(value==3){
						return value='已拒绝';
					}else if(value==6){
						return value='待二级审核';
					}else if(value==7){
						return value='待一级审核';
					}else if(value==1){
						return value='待提交';
					}
				}
			} ] ]
		});
	});

</script>

</html>